<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>微信推送测试</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      max-width: 600px;
      margin: 0 auto;
      padding: 20px;
    }
    .btn {
      padding: 10px 15px;
      background-color: #3b82f6;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }
    .result {
      margin-top: 20px;
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 4px;
      min-height: 100px;
    }
  </style>
</head>
<body>
  <h1>微信推送测试</h1>
  <p>这是一个简单的测试页面，用于测试微信推送功能。</p>
  
  <button id="testBtn" class="btn">测试推送</button>
  
  <div class="result" id="result">结果将显示在这里...</div>
  
  <script>
    document.getElementById('testBtn').addEventListener('click', async function() {
      const result = document.getElementById('result');
      result.textContent = '正在发送推送...';
      
      try {
        const response = await fetch('https://wx.xtuis.cn/WGEEX4QE5CMb7b1hcsL670AIR.send', {
          method: 'POST',
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
          },
          body: new URLSearchParams({
            text: '撸咖健身-会员到期提醒(测试)',
            desp: '这是一条测试消息，如果收到说明推送功能正常工作。'
          })
        });
        
        const data = await response.text();
        result.textContent = '推送成功！响应：' + data;
      } catch (error) {
        result.textContent = '推送失败：' + error.message;
        console.error('推送失败:', error);
      }
    });
  </script>
</body>
</html> 